﻿//using System;
//using System.Collections.Generic;
//using FluentNHibernate.Framework;
//using MbUnit.Framework;
//using NotMyself.Oxite.Data.LinqToNHibernateProvider.Entities;

//namespace NotMyself.Oxite.Data.LinqToNHibernateProvider.Tests.EntityMappings
//{
//    [TestFixture]
//    internal class PersistanceMappingTestFixture : NHibernateFixtureBase
//    {
//        private DateTime testDate = new DateTime(2008, 12, 1);

//        [Test]
//        public void Can_Add_User_To_Database()
//        {
//            var defaultLang = new Language
//                                  {
//                                      Name = "Name",
//                                      DisplayName = "DisplayName"
//                                  };
//            new PersistenceSpecification<User>(Session)
//                .CheckProperty(x => x.Username, "UserName")
//                .CheckProperty(x => x.DisplayName, "DisplayName")
//                .CheckProperty(x => x.Email, "Email")
//                .CheckProperty(x => x.HashedEmail, "HashedEmail")
//                .CheckProperty(x => x.Password, "Password")
//                .CheckProperty(x => x.PasswordSalt, "PasswordSalt")
//                .CheckProperty(x => x.Status, new byte())
//                .VerifyTheMappings();
//            //this stuff fails the test need to find another way to 
//            //test relationships I guess.
//            //.CheckReference(x => x.LanguageDefault, defaultLang)
//            //    .CheckList(x => x.Languages,
//            //               new List<Language>
//            //                   {
//            //                       new Language
//            //                           {
//            //                               Name = "Name",
//            //                               DisplayName = "DisplayName"
//            //                           },
//            //                       defaultLang
//            //                   })
//        }

//        [Test]
//        public void Can_Add_Language_To_Database()
//        {
//            new PersistenceSpecification<Language>(Session)
//                .CheckProperty(x => x.Name, "Name")
//                .CheckProperty(x => x.DisplayName, "DisplayName")
//                .VerifyTheMappings();
//        }

//        [Test]
//        public void Can_Add_Tag_To_Database()
//        {
//            new PersistenceSpecification<Tag>(Session)
//                .CheckProperty(x => x.Name, "Name")
//                .CheckProperty(x => x.Created, testDate)
//                .VerifyTheMappings();
//        }

//        [Test]
//        public void Can_Add_Role_To_Database()
//        {
//            new PersistenceSpecification<Role>(Session)
//                .CheckProperty(x => x.Name, "Name")
//                .VerifyTheMappings();
//        }

//        [Test]
//        public void Can_Message_Tag_To_Database()
//        {
//            new PersistenceSpecification<Message>(Session)
//                .CheckProperty(x => x.Subject, "Subject")
//                .CheckProperty(x => x.Body, "Body")
//                .CheckProperty(x => x.IsSent, true)
//                .CheckProperty(x => x.SentDate, testDate)
//                .VerifyTheMappings();
//        }

//        [Test]
//        public void Can_Add_Comment_To_Database()
//        {
//            new PersistenceSpecification<Comment>(Session)
//                .CheckProperty(x => x.Body, "Body")
//                .CheckProperty(x => x.CreatorIP,1)
//                .CheckProperty(x => x.UserAgent,"UserAgent")
//                .CheckProperty(x => x.State, new Byte())
//                .CheckProperty(x => x.Created, testDate)
//                .CheckProperty(x => x.Modified, testDate)
//                .CheckProperty(x => x.Published, testDate)
//                .VerifyTheMappings();
//        }

//        [Test]
//        public void Can_Add_FileResource_To_Database()
//        {
//            new PersistenceSpecification<FileResource>(Session)
//                .CheckProperty(x => x.Name, "Name")
//                .CheckProperty(x => x.Content, new Byte[]{})
//                .CheckProperty(x => x.ContentType,"String")
//                .CheckProperty(x => x.Path,"path")
//                .CheckProperty(x => x.State, new Byte())
//                .CheckProperty(x => x.Created, testDate)
//                .CheckProperty(x => x.Modified, testDate)
//                .VerifyTheMappings();
//        }

//        [Test]
//        public void Can_Add_StringResource_To_Database()
//        {
//            new PersistenceSpecification<StringResource>(Session)
//                .CheckProperty(x => x.Key,"key")
//                .CheckProperty(x => x.Language,"Lang")
//                .CheckProperty(x => x.Value,1)
//                .CheckProperty(x => x.Value,"string value")
//                .CheckProperty(x => x.CreatorUserID, new Guid())
//                .CheckProperty(x => x.Created, testDate)
//                .VerifyTheMappings();
//        }

//        [Test]
//        public void Can_Add_Area_To_Database()
//        {
            
//            new PersistenceSpecification<Area>(Session)
//                .CheckProperty(x => x.Name, "Name")
//                .CheckProperty(x => x.DisplayName, "DisplayName")
//                .CheckProperty(x => x.Description, "Description")
//                .CheckProperty(x => x.TypeUrl, "TypeUrl")
//                .CheckProperty(x => x.Type, "Type")
//                .CheckProperty(x => x.Created, testDate)
//                .CheckProperty(x => x.Modified, testDate)
//                .VerifyTheMappings();
//        }
//    }
//}